package etf.pia.entity;
// Generated Feb 13, 2014 1:21:45 AM by Hibernate Tools 3.6.0


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Rokovi generated by hbm2java
 */
@Entity
@Table(name="rokovi"
    ,catalog="pia"
)
public class Rokovi  implements java.io.Serializable {


     private Integer idrokovi;
     private Fajlovi fajlovi;
     private Predmet predmet;
     private String opis;
     private Date datum;

    public Rokovi() {
    }

	
    public Rokovi(Fajlovi fajlovi, String opis, Date datum) {
        this.fajlovi = fajlovi;
        this.opis = opis;
        this.datum = datum;
    }
    public Rokovi(Fajlovi fajlovi, Predmet predmet, String opis, Date datum) {
       this.fajlovi = fajlovi;
       this.predmet = predmet;
       this.opis = opis;
       this.datum = datum;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)

    
    @Column(name="idrokovi", unique=true, nullable=false)
    public Integer getIdrokovi() {
        return this.idrokovi;
    }
    
    public void setIdrokovi(Integer idrokovi) {
        this.idrokovi = idrokovi;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="fajl", nullable=false)
    public Fajlovi getFajlovi() {
        return this.fajlovi;
    }
    
    public void setFajlovi(Fajlovi fajlovi) {
        this.fajlovi = fajlovi;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="predmet")
    public Predmet getPredmet() {
        return this.predmet;
    }
    
    public void setPredmet(Predmet predmet) {
        this.predmet = predmet;
    }

    
    @Column(name="opis", nullable=false, length=45)
    public String getOpis() {
        return this.opis;
    }
    
    public void setOpis(String opis) {
        this.opis = opis;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="datum", nullable=false, length=10)
    public Date getDatum() {
        return this.datum;
    }
    
    public void setDatum(Date datum) {
        this.datum = datum;
    }




}


